Optimal. Leaf size=74 \[ \frac {a (c+d x)^3}{3 d}+\frac {2 i a d^2 \cosh (e+f x)}{f^3}+\frac {i a (c+d x)^2 \cosh (e+f x)}{f}-\frac {2 i a d (c+d x) \sinh (e+f x)}{f^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3398, 3377,
2718} \begin {gather*} -\frac {2 i a d (c+d x) \sinh (e+f x)}{f^2}+\frac {i a (c+d x)^2 \cosh (e+f x)}{f}+\frac {a (c+d x)^3}{3 d}+\frac {2 i a d^2 \cosh (e+f x)}{f^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2718
Rule 3377
Rule 3398
Rubi steps
\begin {align*} \int (c+d x)^2 (a+i a \sinh (e+f x)) \, dx &=\int \left (a (c+d x)^2+i a (c+d x)^2 \sinh (e+f x)\right ) \, dx\\ &=\frac {a (c+d x)^3}{3 d}+(i a) \int (c+d x)^2 \sinh (e+f x) \, dx\\ &=\frac {a (c+d x)^3}{3 d}+\frac {i a (c+d x)^2 \cosh (e+f x)}{f}-\frac {(2 i a d) \int (c+d x) \cosh (e+f x) \, dx}{f}\\ &=\frac {a (c+d x)^3}{3 d}+\frac {i a (c+d x)^2 \cosh (e+f x)}{f}-\frac {2 i a d (c+d x) \sinh (e+f x)}{f^2}+\frac {\left (2 i a d^2\right ) \int \sinh (e+f x) \, dx}{f^2}\\ &=\frac {a (c+d x)^3}{3 d}+\frac {2 i a d^2 \cosh (e+f x)}{f^3}+\frac {i a (c+d x)^2 \cosh (e+f x)}{f}-\frac {2 i a d (c+d x) \sinh (e+f x)}{f^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.25, size = 88, normalized size = 1.19 \begin {gather*} \frac {a \left (f^3 x \left (3 c^2+3 c d x+d^2 x^2\right )+3 i \left (c^2 f^2+2 c d f^2 x+d^2 \left (2+f^2 x^2\right )\right ) \cosh (e+f x)-6 i d f (c+d x) \sinh (e+f x)\right )}{3 f^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 248 vs. \(2 (69 ) = 138\).
time = 0.37, size = 249, normalized size = 3.36
method | result | size |
risch | \(\frac {a \,d^{2} x^{3}}{3}+a d c \,x^{2}+a \,c^{2} x +\frac {a \,c^{3}}{3 d}+\frac {i a \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}-2 d^{2} f x -2 c d f +2 d^{2}\right ) {\mathrm e}^{f x +e}}{2 f^{3}}+\frac {i a \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}+2 d^{2} f x +2 c d f +2 d^{2}\right ) {\mathrm e}^{-f x -e}}{2 f^{3}}\) | \(148\) |
derivativedivides | \(\frac {\frac {d^{2} a \left (f x +e \right )^{3}}{3 f^{2}}+\frac {i d^{2} a \left (\left (f x +e \right )^{2} \cosh \left (f x +e \right )-2 \left (f x +e \right ) \sinh \left (f x +e \right )+2 \cosh \left (f x +e \right )\right )}{f^{2}}-\frac {d^{2} e a \left (f x +e \right )^{2}}{f^{2}}-\frac {2 i d^{2} e a \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f^{2}}+\frac {d c a \left (f x +e \right )^{2}}{f}+\frac {2 i d c a \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}+\frac {d^{2} e^{2} a \left (f x +e \right )}{f^{2}}+\frac {i d^{2} e^{2} a \cosh \left (f x +e \right )}{f^{2}}-\frac {2 d e c a \left (f x +e \right )}{f}-\frac {2 i d e c a \cosh \left (f x +e \right )}{f}+a \,c^{2} \left (f x +e \right )+i c^{2} a \cosh \left (f x +e \right )}{f}\) | \(249\) |
default | \(\frac {\frac {d^{2} a \left (f x +e \right )^{3}}{3 f^{2}}+\frac {i d^{2} a \left (\left (f x +e \right )^{2} \cosh \left (f x +e \right )-2 \left (f x +e \right ) \sinh \left (f x +e \right )+2 \cosh \left (f x +e \right )\right )}{f^{2}}-\frac {d^{2} e a \left (f x +e \right )^{2}}{f^{2}}-\frac {2 i d^{2} e a \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f^{2}}+\frac {d c a \left (f x +e \right )^{2}}{f}+\frac {2 i d c a \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}+\frac {d^{2} e^{2} a \left (f x +e \right )}{f^{2}}+\frac {i d^{2} e^{2} a \cosh \left (f x +e \right )}{f^{2}}-\frac {2 d e c a \left (f x +e \right )}{f}-\frac {2 i d e c a \cosh \left (f x +e \right )}{f}+a \,c^{2} \left (f x +e \right )+i c^{2} a \cosh \left (f x +e \right )}{f}\) | \(249\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 149 vs. \(2 (69) = 138\).
time = 0.27, size = 149, normalized size = 2.01 \begin {gather*} \frac {1}{3} \, a d^{2} x^{3} + a c d x^{2} + a c^{2} x + i \, a c d {\left (\frac {{\left (f x e^{e} - e^{e}\right )} e^{\left (f x\right )}}{f^{2}} + \frac {{\left (f x + 1\right )} e^{\left (-f x - e\right )}}{f^{2}}\right )} + \frac {1}{2} i \, a d^{2} {\left (\frac {{\left (f^{2} x^{2} e^{e} - 2 \, f x e^{e} + 2 \, e^{e}\right )} e^{\left (f x\right )}}{f^{3}} + \frac {{\left (f^{2} x^{2} + 2 \, f x + 2\right )} e^{\left (-f x - e\right )}}{f^{3}}\right )} + \frac {i \, a c^{2} \cosh \left (f x + e\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 175 vs. \(2 (69) = 138\).
time = 0.37, size = 175, normalized size = 2.36 \begin {gather*} \frac {{\left (3 i \, a d^{2} f^{2} x^{2} + 3 i \, a c^{2} f^{2} + 6 i \, a c d f + 6 i \, a d^{2} - 6 \, {\left (-i \, a c d f^{2} - i \, a d^{2} f\right )} x - 3 \, {\left (-i \, a d^{2} f^{2} x^{2} - i \, a c^{2} f^{2} + 2 i \, a c d f - 2 i \, a d^{2} + 2 \, {\left (-i \, a c d f^{2} + i \, a d^{2} f\right )} x\right )} e^{\left (2 \, f x + 2 \, e\right )} + 2 \, {\left (a d^{2} f^{3} x^{3} + 3 \, a c d f^{3} x^{2} + 3 \, a c^{2} f^{3} x\right )} e^{\left (f x + e\right )}\right )} e^{\left (-f x - e\right )}}{6 \, f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.28, size = 314, normalized size = 4.24 \begin {gather*} a c^{2} x + a c d x^{2} + \frac {a d^{2} x^{3}}{3} + \begin {cases} \frac {\left (\left (2 i a c^{2} f^{5} + 4 i a c d f^{5} x + 4 i a c d f^{4} + 2 i a d^{2} f^{5} x^{2} + 4 i a d^{2} f^{4} x + 4 i a d^{2} f^{3}\right ) e^{- f x} + \left (2 i a c^{2} f^{5} e^{2 e} + 4 i a c d f^{5} x e^{2 e} - 4 i a c d f^{4} e^{2 e} + 2 i a d^{2} f^{5} x^{2} e^{2 e} - 4 i a d^{2} f^{4} x e^{2 e} + 4 i a d^{2} f^{3} e^{2 e}\right ) e^{f x}\right ) e^{- e}}{4 f^{6}} & \text {for}\: f^{6} e^{e} \neq 0 \\\frac {x^{3} \left (i a d^{2} e^{2 e} - i a d^{2}\right ) e^{- e}}{6} + \frac {x^{2} \left (i a c d e^{2 e} - i a c d\right ) e^{- e}}{2} + \frac {x \left (i a c^{2} e^{2 e} - i a c^{2}\right ) e^{- e}}{2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 150 vs. \(2 (66) = 132\).
time = 0.44, size = 150, normalized size = 2.03 \begin {gather*} \frac {1}{3} \, a d^{2} x^{3} + a c d x^{2} + a c^{2} x - \frac {{\left (-i \, a d^{2} f^{2} x^{2} - 2 i \, a c d f^{2} x - i \, a c^{2} f^{2} + 2 i \, a d^{2} f x + 2 i \, a c d f - 2 i \, a d^{2}\right )} e^{\left (f x + e\right )}}{2 \, f^{3}} + \frac {{\left (i \, a d^{2} f^{2} x^{2} + 2 i \, a c d f^{2} x + i \, a c^{2} f^{2} + 2 i \, a d^{2} f x + 2 i \, a c d f + 2 i \, a d^{2}\right )} e^{\left (-f x - e\right )}}{2 \, f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.25, size = 118, normalized size = 1.59 \begin {gather*} \frac {-\frac {a\,f\,\left (6{}\mathrm {i}\,x\,\mathrm {sinh}\left (e+f\,x\right )\,d^2+6{}\mathrm {i}\,c\,\mathrm {sinh}\left (e+f\,x\right )\,d\right )}{3}+\frac {a\,f^2\,\left (c^2\,\mathrm {cosh}\left (e+f\,x\right )\,3{}\mathrm {i}+d^2\,x^2\,\mathrm {cosh}\left (e+f\,x\right )\,3{}\mathrm {i}+c\,d\,x\,\mathrm {cosh}\left (e+f\,x\right )\,6{}\mathrm {i}\right )}{3}+a\,d^2\,\mathrm {cosh}\left (e+f\,x\right )\,2{}\mathrm {i}}{f^3}+\frac {a\,\left (3\,c^2\,x+3\,c\,d\,x^2+d^2\,x^3\right )}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________